<?php

$timeStamp = $_POST['key'];

$price = $_POST['price']

$json_string = file_get_contents("text.json");// 从文件中读取数据到PHP变量

$data = json_decode($json_string,true);// 把JSON字符串转成PHP数组

$data["001"][$timeStamp] = $price;

$json_strings = json_encode($data);

file_put_contents("text.json",$json_strings);

echo 'test';
?>